package com.csl.seckill.commom;

//响应码
public enum ResponseCodeEnum {

    //成功
    SUCCESS(200,"success"),
    SERVER_ERROR(500,"server error"),
    NO_DATA(50001,"no data in mysql"),
    //失败
    //手机号校验失败
    PHONE_VERIFICATION_FAILED(40001,"手机号格式不正确"),
    //邮箱校验
    EMAIL_VERFICATION_FAILED(40002,"邮箱格式不正确")
    //用户名或密码错误

    //认证失败
    // 无权限
    ;



    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    ResponseCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "ResponseCodeEnum{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
